package com.nmf.site.modules.sys.utils;

import java.util.List;

import com.nmf.dao.gen.BaseCategoryMapper;
import com.nmf.dao.gen.bean.BaseCategory;
import com.nmf.dao.gen.bean.BaseCategoryExample;
import com.nmf.site.common.utils.SpringContextHolder;

public class CategoryUtils {
	private static BaseCategoryMapper baseCategoryMapper = SpringContextHolder.getBean(BaseCategoryMapper.class);
	
	public static List<BaseCategory> getCategoryList(Integer type){
		BaseCategoryExample baseCategoryExample = new BaseCategoryExample();
		baseCategoryExample.createCriteria().andCategoryTypeEqualTo(type);
		return baseCategoryMapper.selectByExample(baseCategoryExample);
	}
	
}
